from selenium import webdriver
from time import sleep
from selenium.webdriver.chrome.options import Options

from Util.util import find_element

chrome_Path = 'E:\RF\chromedriver.exe'
options = Options()
options.add_argument('--start-maximized')
wd = webdriver.Chrome(executable_path=chrome_Path,options=options)

wd.get('https://mail.163.com/')
# i_frame = wd.find_element_by_tag_name('iframe')
i_frame = find_element(wd,'tag name','iframe')
wd.switch_to_frame(i_frame)

# wd.find_element_by_name('email').send_keys('13037521553')
find_element(wd,'name','email').send_keys('13037521553')
# wd.find_element_by_name('password').send_keys('Ruru970929.')
find_element(wd,'name','password').send_keys('Ruru970929.')
# wd.find_element_by_id('dologin').click()
find_element(wd,'id','dologin').click()


'''
PO模型

对象层：用于存放各页面（勒种实现了元素的定位，和控件的操作）
逻辑层：一些封装好的功能用例的模块
业务层：真正实现测试用例操作的部分
'''
